import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Test from "../views/Test";
import Home from "../views/Home";
import Test1 from "../views/Test1";
import Test2 from "../views/Test2";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',  // 陆游的地址
        name: 'Login',
        component: Login,  // 陆游的组件
        hidden: true
    },
    {
        path: '/test',
        name: '导航一',
        component: Test,

    },
    {
        path: '/home',
        name: '导航二',
        component: Home,
        children:[
            {
                path: '/test1',
                name: '选项一',
                component: Test1,
            },
            {
                path: '/test2',
                name: '选项二',
                component: Test2,
            }

        ]
    }
    ,

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
